<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body>
        <script>
            const promise1 = new Promise((resolve, reject) => {
                setTimeout(() => {
                    resolve('success');
                }, 1000);
            }).then(() => {
                throw new Error('error!!!');
            });
            // const promise2 = promise1.
            // console.log('promise1', promise1);
            // console.log('promise2', promise2);
            // setTimeout(() => {
            //     console.log('promise1', promise1);
            //     console.log('promise2', promise2);
            // }, 2000);
        </script>
    </body>
</html>
